<?php

namespace ticket\modules\frontend\models;

use Yii;

/**
 * This is the model class for table "tk_ticket_addional_attr".
 *
 * @property int $id
 * @property int $tid
 * @property string $attr_name
 * @property string $attr_ename
 * @property int $attr_type
 * @property string $attr_value
 * @property string $default_val
 * @property string $state
 * @property string $create_time
 */
class TicketAddionalAttr extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'tk_ticket_addional_attr';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['tid', 'attr_name', 'attr_ename', 'attr_type'], 'required'],
            [['tid', 'attr_type'], 'integer'],
            [['attr_value', 'state'], 'string'],
            [['create_time'], 'safe'],
            [['attr_name', 'attr_ename'], 'string', 'max' => 32],
            [['default_val'], 'string', 'max' => 1024],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'tid' => 'Tid',
            'attr_name' => 'Attr Name',
            'attr_ename' => 'Attr Ename',
            'attr_type' => 'Attr Type',
            'attr_value' => 'Attr Value',
            'default_val' => 'Default Val',
            'state' => 'State',
            'create_time' => 'Create Time',
        ];
    }
}
